-- GENERATED SPELL FOR [General Lightsbane] --


function spell0_29851(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29851', 534, 1)
end

function spell1_29851(pUnit, Event) --@Death and Decay,n/a--
pUnit:FullCastSpellOnTarget(60160,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29851', 10000, 1)
end

function spell2_29851(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(60186,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29851', 12000, 1)
end

function Sorts_29851(pUnit, Event)
local choix_sorts_29851 = math.random(0, 2)
if choix_sorts_29851 == 0 then
pUnit:RegisterEvent('spell0_29851', 1, 1)
end
if choix_sorts_29851 == 1 then
pUnit:RegisterEvent('spell1_29851', 1, 1)
end
if choix_sorts_29851 == 2 then
pUnit:RegisterEvent('spell2_29851', 1, 1)
end
end

function mob29851_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29851', math.random(1500, 3000), 1)
end

function mob29851_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29851_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29851_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29851, 1, 'mob29851_Action')
RegisterUnitEvent(29851, 2, 'mob29851_Leave')
RegisterUnitEvent(29851, 3, 'mob29851_Kill')
RegisterUnitEvent(29851, 4, 'mob29851_Die')
